<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var i = 10;
    ;(function(w){
        for(var i = 0;i<100;i<){
            conso
        }
        console.log(w);
    })(window)

    function foo(w){
        console.log(w)
    }
    foo(window)
//    console.log(window)
</script>
</body>
</html>